<template>
		<view class="piaofu">
		  <view @click="backTop"><image src='../../static/images/bakctop.png' mode="scaleToFill" class="backtop"></image></view>
		</view>
</template>

<script>
	export default {
		name:"FloatButton",
		data() {
			return {
				backTopValue: false,
			};
		},
		methods:{
		  // 滚动到顶部
		  backTop() {
			// 控制滚动
			uni.pageScrollTo({
			    duration:0,
			    scrollTop:0,
			})
		  },
		}
	}
</script>

<style scoped>
.piaofu {
  position: fixed;
  right: 20rpx;
  bottom: 80rpx;
  text-align: center;
  flex-direction:row;
}
.backtop {
    width: 94rpx;
    height: 94rpx;
    margin-bottom: 15rpx;
}
</style>
